<?php
/* @var $this AlumniController */
/* @var $model Alumni */
/* @var $form CActiveForm */
?>


<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'alumni-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'alumni_fname'); ?>
		<?php echo $form->textField($model,'alumni_fname',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'alumni_fname'); ?>
	</div>

	
	
	<div class="row">
		<?php echo $form->labelEx($model,'alumni_lname'); ?>
		<?php echo $form->textField($model,'alumni_lname',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'alumni_lname'); ?>
	</div>

	
	<div class="row">
		<?php echo $form->labelEx($model,'alumni_gender'); ?>
                <?php echo $form->dropDownList($model,'alumni_gender', $model->getGenderOptions()); ?>
                <?php //echo $form->textField($model,'alumni_gender',array('size'=>6,'maxlength'=>6)); ?>
                <?php echo $form->error($model,'alumni_gender'); ?>
	</div>
	
	
	
	
	<div class="row">
		<?php echo $form->labelEx($model,'alumni_birthday'); ?>
	<?php 
$form->widget('zii.widgets.jui.CJuiDatePicker', array(
'model'=>$model,
'attribute'=>'alumni_birthday',
'name'=>$model->alumni_birthday, // This is how it works for me.
'value'=>$model->alumni_birthday,
'options'=>array('dateFormat'=>'yy-mm-dd', 
'altFormat'=>'dd-mm-yy', 
'changeMonth'=>'true', 
'changeYear'=>'true', 
'yearRange'=>'1920:2010', 
'showOn'=>'both',
'buttonText'=>'...'),
'htmlOptions'=>array('size'=>'10')
));
?>
		<?php echo $form->error($model,'alumni_birthday'); ?>
	</div>
	
	
	
	
	<div class="row">
		<?php echo $form->labelEx($model,'alumni_age'); ?>
		<?php echo $form->textField($model,'alumni_age',array('size'=>1,'maxlength'=>2)); ?>
		<?php echo $form->error($model,'alumni_age'); ?>
	</div>

	

	<div class="row">
		<?php echo $form->labelEx($model,'alumni_address'); ?>
		<?php echo $form->textField($model,'alumni_address',array('size'=>60,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'alumni_address'); ?>
	</div>

	

	
	<div class="row">
		 <?php echo $form->labelEx($model,'alumni_status'); ?>
                <?php echo $form->dropDownList($model,'alumni_status', $model->getCivilStatusOption()); ?>
                <?php //echo $form->textField($model,'alumni_status',array('size'=>20,'maxlength'=>20)); ?>
                <?php echo $form->error($model,'alumni_status'); ?>
	</div>

	
	
	
	<div class="row">
		<?php echo $form->labelEx($model,'alumni_contactnumber'); ?>
		<?php echo $form->textField($model,'alumni_contactnumber'); ?>
	
		<?php echo $form->error($model,'alumni_contactnumber'); ?>
	</div>

	
	
	<div class="row">
		<?php echo $form->labelEx($model,'alumni_email'); ?>
		<?php echo $form->textField($model,'alumni_email',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'alumni_email'); ?>
	</div>
	


	<div class="row">
		<?php echo $form->labelEx($model,'donation_id'); ?>
		<?php echo $form->dropDownList ($model, 'donation_id', CHtml::listData(
		Donation::model()->findAll(), 'id','donation_number'),
			array('prompt' => 'Donation Number')
			); ?>
		<?php echo $form->error($model,'donation_id'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'occupation_id'); ?>
		<?php echo $form->dropDownList ($model, 'occupation_id', CHtml::listData(
		Occupation::model()->findAll(), 'id','occupation_name'),
			array('prompt' => 'Occupation')
			); ?>	
		<?php echo $form->error($model,'occupation_id'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'company_id'); ?>
		<?php echo $form->dropDownList ($model, 'company_id', CHtml::listData(
		Company::model()->findAll(), 'id','company_contact'),
			array('prompt' => 'Contact Number')
			); ?>
		<?php echo $form->error($model,'company_id'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'alumni_picture'); ?>
		<?php echo $form->fileField($model,'alumni_picture'); ?>
	



		<?php echo $form->error($model,'alumni_picture'); ?>
		
		
		
	</div>
	

	

		<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->